package com.yuyou.tas.service.api.admin.service;

import com.yuyou.tas.service.api.admin.dto.AuthUserSubjectDTO;
import com.yuyou.tas.service.api.admin.dto.SycnUserUpdateObj;
import com.yuyou.tas.service.api.admin.entity.AuthUser;
import com.yuyou.tas.service.api.admin.entity.AuthUserSection;
import com.yuyou.tas.util.bean.ResBoolSimpleInfo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;





@FeignClient(value = "tas-admin-service")
@RequestMapping(value = "/authUserAPI")
public interface AuthUserAPI {
	
	@RequestMapping(value = "/selectById")
	AuthUser selectById(@RequestParam("id") Long id);
	
	@RequestMapping(value = "/selectByOrgan7OId")
	AuthUser selectByOrgan7OId(@RequestParam("oId")Long oId, @RequestParam("authOrganizationId")Long authOrganizationId);
	
	@RequestMapping(value = "/sycnUserByOId")
	ResBoolSimpleInfo<String> sycnUserByOId(@RequestBody List<SycnUserUpdateObj> list);
	
	@RequestMapping(value = "/findSubjectByAuthUserId")
	List<AuthUserSubjectDTO> findSubjectByAuthUserId(@RequestParam("userId")Long userId);
	
	@RequestMapping(value = "/findUniSectionByUserId")
	Set<Long> findUniSectionByUserId(@RequestParam("userId")Long userId);

	@RequestMapping(value = "/findSectionByUserIdSubjectId")
	AuthUserSection findSectionByUserIdSubjectId(@RequestParam(value = "authUserId") Long authUserId, @RequestParam(value = "dataSubject") Long dataSubject);

	@RequestMapping(value = "/findCountByParams")
	Integer findCountByParams(@RequestParam(value = "authUserId")Long authUserId,
							  @RequestParam(value = "dataSubject")Long dataSubject,
							  @RequestParam(value = "sectionId")Long sectionId);

}
